package com.ruoyi.quartz.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quartz.mapper.CgZqbcMainMapper;
import com.ruoyi.quartz.domain.CgZqbcMain;
import com.ruoyi.quartz.service.ICgZqbcMainService;

/**
 * CgZqbcMainService业务层处理
 * 
 * @author SYF
 * @date 2025-05-09
 */
@Service
public class CgZqbcMainServiceImpl implements ICgZqbcMainService 
{
    @Autowired
    private CgZqbcMainMapper cgZqbcMainMapper;

    /**
     * 查询CgZqbcMain
     * 
     * @param fdate CgZqbcMain主键
     * @return CgZqbcMain
     */
    @Override
    public CgZqbcMain selectCgZqbcMainByFdate(String fdate)
    {
        return cgZqbcMainMapper.selectCgZqbcMainByFdate(fdate);
    }

    /**
     * 查询CgZqbcMain列表
     * 
     * @param cgZqbcMain CgZqbcMain
     * @return CgZqbcMain
     */
    @Override
    public List<CgZqbcMain> selectCgZqbcMainList(CgZqbcMain cgZqbcMain)
    {
        return cgZqbcMainMapper.selectCgZqbcMainList(cgZqbcMain);
    }

    /**
     * 新增CgZqbcMain
     * 
     * @param cgZqbcMain CgZqbcMain
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertCgZqbcMain(CgZqbcMain cgZqbcMain)
    {
        return cgZqbcMainMapper.insertCgZqbcMain(cgZqbcMain);
    }

    /**
     * 修改CgZqbcMain
     * 
     * @param cgZqbcMain CgZqbcMain
     * @return 结果
     */
    @Override
    public int updateCgZqbcMain(CgZqbcMain cgZqbcMain)
    {
        return cgZqbcMainMapper.updateCgZqbcMain(cgZqbcMain);
    }

    /**
     * 批量删除CgZqbcMain
     * 
     * @param fdates 需要删除的CgZqbcMain主键
     * @return 结果
     */
    @Override
    public int deleteCgZqbcMainByFdates(String[] fdates)
    {
        return cgZqbcMainMapper.deleteCgZqbcMainByFdates(fdates);
    }

    /**
     * 删除CgZqbcMain信息
     * 
     * @param fdate CgZqbcMain主键
     * @return 结果
     */
    @Override
    public int deleteCgZqbcMainByFdate(String fdate)
    {
        return cgZqbcMainMapper.deleteCgZqbcMainByFdate(fdate);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCgZqbcData1(){
        return cgZqbcMainMapper.selectCgZqbcData1();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCgZqbcData2(){
        return cgZqbcMainMapper.selectCgZqbcData2();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int clearCgZqbcData(){
        return cgZqbcMainMapper.clearCgZqbcData();
    }
}
